package com.spi.soconversion.orders.conversion;

public enum ItemGroupCode {
	LNR("LNR","PROD"),
	NC("NC","PROD"),
	STD("STD", "PROD"),
	SB("SB", "PROD"),
	SP("SP", "PROD"),
	SPE("SPE", "PROD"),
	SUITE("SUITE", "PROD"),
	WR("WR","PROD"),
	WRFEE("WRFEE","PROD"),
	EFEE("EFEE","PROD"),
	WTY("WTY", "PROD"),
	CON("CON", "PROD"),
	CUS("CUS", "PROD"),
	PINS3("3PINS","PS"),
	ASBL("ASBL","PS"),
	HU("HU", "PS"),
	DEL("DEL", "DS"),
	INS("INS", "PS");

	private String code;
	private String displayText;
			
	private ItemGroupCode(String code, String displayText) {
		this.code= code;
		this.displayText=displayText;
	}
	
	/**
	 * Get the item group code
	 * @param cofiValue
	 * @return
	 */
	public static String getItemGroupCode(String cofiValue) {
		for (ItemGroupCode igc : ItemGroupCode.values()) {
			if (igc.code.equals(cofiValue)) {
				return igc.displayText;
			}		
		}
		return null;
	}

	public String getCode() {
		return code;
	}

	public void setCode(String code) {
		this.code = code;
	}

	public String getDisplayText() {
		return displayText;
	}

	public void setDisplayText(String displayText) {
		this.displayText = displayText;
	}
}